/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.safetytask.mapper;

import com.koron.safetytask.domain.UserTaskResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserTaskResultMapper {
    /**
     * 新增任务结果
     * @param userTaskResult
     * @return
     */
    Integer insert(@Param("userTaskResult") UserTaskResult userTaskResult);

    /**
     * 修改任务结果
     * @param userTaskResult
     * @return
     */
    Integer update(@Param("userTaskResult") UserTaskResult userTaskResult);

    /**
     * 根据主键查询任务结果
     * @param id
     * @return
     */
    UserTaskResult queryOne(@Param("id") String id);

    /**
     * 根据任务id查询任务结果
     * @param userTaskId
     * @return
     */
    List<UserTaskResult> queryResultListByUserTaskId(@Param("userTaskId") String userTaskId);

    UserTaskResult queryResultByUserTaskIdAndExecutorCode(@Param("userTaskId") String userTaskId,@Param("executorCode") String executorCode);
}
